package 深入反射机制.获取父类和父接口.test01;

import test.Student;

public class ReflectTest01 {
    public static void main(String[] args) {
        Class studentClass = String.class;
        //获取父类
        Class superclass = studentClass.getSuperclass();
        System.out.println(superclass.getSimpleName());
        //获取接口
        Class[] interfaces = studentClass.getInterfaces();
        for (Class c : interfaces){
            System.out.println(c.getName());
        }
    }
}













